#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 25 10:50:05 2021

@author: Aiping
"""
#breakpoint()
def fact(x):
   f = 1
   for i in range(1,x+1):
      print (i)
      f = f * i
   return f

fact(3)